# -*- coding:utf-8 -*-
class Solution:
    def Fibonacci(self, n):
        # write code here
        first = 0
        second = 1
        res = 0
        if n <=1:
            return n
        for i in range(n-1):
            res = first + second
            first = second
            second = res
        return res